package zlog

import (
	"context"
	"time"

	"github.com/go-kratos/kratos/v2/log"
	"gorm.io/gorm/logger"
)

type NopLogger struct{}

func NewNopLogger() *NopLogger {
	return &NopLogger{}
}

func (l *NopLogger) Debugf(format string, args ...any) {

}

func (l *NopLogger) Debugw(msg string, keyvals ...any) {

}

func (l *NopLogger) Infof(format string, args ...any) {

}

func (l *NopLogger) Infow(msg string, keyvals ...any) {

}

func (l *NopLogger) Warnf(format string, args ...any) {

}

func (l *NopLogger) Warnw(msg string, keyvals ...any) {

}

func (l *NopLogger) Errorf(format string, args ...any) {

}

func (l *NopLogger) Errorw(msg string, keyvals ...any) {

}

func (l *NopLogger) Panicf(format string, args ...any) {

}

func (l *NopLogger) Panicw(msg string, keyvals ...any) {

}

func (l *NopLogger) Fatalf(format string, args ...any) {

}

func (l *NopLogger) Fatalw(msg string, keyvals ...any) {

}

func (l *NopLogger) With(fields ...Field) Logger {
	return l
}

func (l *NopLogger) AddCallerSkip(skip int) Logger {
	return l
}

func (l *NopLogger) Sync() {

}

func (l *NopLogger) Log(level log.Level, keyvals ...any) error {
	return nil
}

func (l *NopLogger) LogMode(_ logger.LogLevel) logger.Interface {
	return l
}

func (l *NopLogger) Info(_ context.Context, _ string, _ ...interface{}) {

}

func (l *NopLogger) Warn(_ context.Context, _ string, _ ...interface{}) {

}

func (l *NopLogger) Error(_ context.Context, _ string, _ ...interface{}) {

}

func (l *NopLogger) Trace(ctx context.Context, begin time.Time, fc func() (sql string, rowsAffected int64), err error) {

}
